
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<script type="text/javascript" src="../../zxt/zxt.js"></script>
		<script>importZXT("../../zxt");</script>
	</head>
    
	<body>
		
		<button onclick="getValue()">Get Value</button> 
		<button onclick="setValue()">Set Value</button> 
		
		<hr/>
		
		<div id="Sum1" zxt="zxt.ui.Sum" zxt.Scale="11,2"></div>
		
		<table>
			<tr>
				<td width="20%">getType()</td>
				<td width="50%">返回控件类型</td>
				<td><input type="button" name="getType" value="getType" 
					onclick="alert('金额控件的type为'+$zxtUI.Sum1.getType());"/></td>
			</tr>
			<tr>
				<td>maxLength(v)</td>
				<td>如果参数没有上送，则返回当前的最大长度；否则，重新设置最大长度</td>
				<td><input type="button" name="maxLength" value="maxLength" 
					onclick="alert('金额控件的maxLength为'+$zxtUI.Sum1.maxLength());"/></td>
			</tr>
			<tr>
				<td>scaleLength(v)</td>
				<td>如果参数没有上送，则返回当前的小数位数；否则，重新设置</td>
				<td><input type="button" name="scaleLength" value="scaleLength" 
					onclick="alert('金额控件的scaleLength为'+$zxtUI.Sum1.scaleLength());"/></td>
			</tr>
		</table>
		
		<div><a href="../index.html">返回</a></div>
	</body>
</html>

<script type="text/javascript">

	$zxt.init();


	function getValue(){
		alert($zxtUI.Sum1.getValue());
	};
	
	function setValue(){
		$zxtUI.Sum1.setValue("100");
		$zxtUI.Sum1.render();
	};


</script>
